import { createApp } from 'vue'
import md5 from 'js-md5'
import App from './App.vue'
import router from './router/index'
import './assets/font/iconfont.css'
import tipswin from './tipswin.js'
import axios from "axios"
import qrcodeParser from 'qrcode-parser'//二维码识别
import VueQrcode from '@chenfengyuan/vue-qrcode'

var app = createApp(App)
app.component(VueQrcode.name, VueQrcode)
app.config.globalProperties.tipswin = tipswin
axios.defaults.withCredentials = true
app.config.globalProperties.axios = axios
let wssrc = window.location.origin.replace('https', 'ws')
app.config.globalProperties.wsurl = wssrc.replace('http', 'ws')
//app.config.globalProperties.wsurl = 'ws://192.168.123.10:38081'
app.config.globalProperties.md5 = md5
app.config.globalProperties.userobj = {}
app.config.globalProperties.qrcodeParser = qrcodeParser
app.use(router)
app.mount('#app')
